<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="Categorías"></h:outputText>
        </ui:define>
        <ui:define name="body"> 
            <h:form>
                <h:commandLink action="#{productosController.categorizar}" value="Todas">
                    <f:param name="param" value="#{item.categoria}" />
                </h:commandLink>
                <h:dataTable value="#{categoriasController.items}" var="item">
                    <h:column>
                        <h:commandLink action="#{productosController.categorizar}" value="#{item.categoria}">
                            <f:param name="param" value="#{item.categoria}" />
                        </h:commandLink>
                    </h:column>
                </h:dataTable>
            </h:form> 
        </ui:define>
    </ui:composition>

</html>
